package com.dcm.groupbuy.mapper;

import com.dcm.groupbuy.bo.NumberBo;
import com.dcm.groupbuy.bo.OrderBo;
import com.dcm.groupbuy.entity.GroupOrderEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author 牛浩
 */
@Component
public interface OrderBoMapper {
    /**
     *添加拼团订单的数量
     * @param orderBo
     */
    void insertOrderBo(@RequestBody OrderBo orderBo);

    /**
     * 模糊查询
     * @param id
     * @param name
     * @return
     */
    List<OrderBo> search(@RequestParam("id") Long id, @RequestParam("name") String name);

    /**
     * 根据id修改
     * @param id
     * @return
     */
    OrderBo findById(@RequestParam("id") Long id);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    List<OrderBo> vague(Long id);

    /**
     * 查询参与人数和成团数量
     * @return
     */
    NumberBo searchNum();

    /**
     * 单独购买
     * @param id
     * @param memberUsername
     * @param note
     */
    void mySeIf(@RequestParam("id") Long id,@RequestParam("memberUsername")String memberUsername,@RequestParam("note") String note);

    /**
     * 查询全部
     * @return
     */
    List<OrderBo> findAll();
}
